Modernize tooling: uv build/test, just, ruff (drop Docker for Python envs & Make)#808
Open
edavidaja wants to merge 19 commits into
Open
Modernize tooling: uv build/test, just, ruff (drop Docker for Python envs & Make)#808edavidaja wants to merge 19 commits into
edavidaja wants to merge 19 commits into
Conversation
- Add tests/testdata to ruff extend-exclude (fixture notebooks, not source) - Complete conftest.py pytest_collection_modifyitems (was missing the loop body) - Reformat 7 source files with ruff format (black-compatible, line-length 120)
…docs - Add --vetiver flag to dev-connect CI pytest call so vetiver tests actually run (without it conftest.py skips them unconditionally) - Add wheel-contents assertion step in distributions job: verifies py.typed and quickstart templates present, no test files included - Update CONTRIBUTING.md setup bullets to describe uv+just flow - Update CLAUDE.md CI matrix range from 3.8-3.12 to 3.8-3.13
a4b5a83 to
e66887d
Compare
|
The old Makefile injected CONNECT_CONTENT_BUILD_DIR=rsconnect-build-test via TEST_ENV. The uv/just migration dropped it, so test_main_content.py asserted against a build dir that was never used. Set it in conftest.py (imported before any rsconnect import, since metadata.py binds the var as a default arg at import time) so it works under both scripts/runtests and direct pytest invocations.
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
uv cannot spawn the shebang ./scripts/runtests directly on Windows (os error 193: not a valid Win32 application). Invoke it through bash, which is available on GitHub Windows runners, keeping scripts/runtests as the single source of pytest args.
Contributor
|
This is great. Can you also remove the .vscode settings file that insists on installing black? |
| @@ -1,6 +1,6 @@ | |||
| { | |||
| "recommendations": [ | |||
| "ms-python.vscode-pylance", | |||
Contributor
There was a problem hiding this comment.
I think we should drop pylance too
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Modernizes the build and test toolchain onto an astral-native stack, removing Docker where it was only providing Python environments, and removing
make. The Connect-server Docker setups (docker-compose.yml,vetiver-testing/,integration-testing/) are intentionally kept —uvcannot run the Connect product.setuptools+setuptools_scm→uv_build(flat-layoutmodule-name/module-root).[project].versionmanaged withuv version.maincarries a.devversion (1.29.1.dev0) so dev installs stay pre-release (keeps the update-nag off) and never collide with a published release. RuntimeVERSIONnow resolves viaimportlib.metadata(both published dist names). A CI guard asserts the tag matches the version on tag builds.[dependency-groups]soruff/pyright/twine/pytest/mkdocs are not advertised in the published wheel metadata. Genuine runtime features (keyring,snowflake,mcp) remain extras.black+flake8→ruff(format + check).pyrightkept, advisory (matches today's behavior; see fix pyright errors #774).uv run --python <X>.Makefile→Justfile.main.yml+preview-docs.ymlrun onastral-sh/setup-uv+just; integration jobs keep the Docker Connect server but install/run viauv. Added auv lock --lockeddrift check and a wheel-contents assertion (py.typed + quickstart templates present, tests excluded).Deleted:
Dockerfile,docs/Dockerfile,Makefile,setup.py,scripts/build-image,rsconnect/version.py.Testing / review notes
just lint,just test <ver>, andjust dist(wheel + sdist,twine checkPASSED) verified locally; built wheel confirmed to containrsconnect/py.typedand the quickstart templates and to excludetests/.orjson/Cargo build for theshinyquickstart +test_main_contentTEMP_DIR paths) and 131 pre-existing pyright strict errors (fix pyright errors #774, why pyright is advisory).test-dev-connectjob now passes--vetiverso vetiver tests actually run (the conftest skip-hook was previously inert and is now correctly applied).Draft — open items before marking ready
uv_build>=0.9.0,<0.10.0pin does not warn under the CI uv version.